import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 资产列表
export const zcAssetListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetList',
      data: data
    }
  })
}

// 疫苗列表
export const zcVaccineSingleDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcVaccineSingleDetailedList',
      data: data
    }
  })
}

// 就医列表
export const zcAssetMedicalOrderListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetMedicalOrderList',
      data: data
    }
  })
}

// 体重列表
export const zcAssetWeightLogListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetWeightLogList',
      data: data
    }
  })
}

// 附件照片
export const sysRelFileListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'sysRelFileList',
      data: data
    }
  })
}

// GPS
export const zcAssetGpsLogListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetGpsLogList',
      data: data
    }
  })
}

// 栏位
export const spEnclosureSingleDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spEnclosureSingleDetailedList',
      data: data
    }
  })
}

// 喂养
export const zcAssetFeedLogSingleDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetFeedLogSingleDetailedList',
      data: data
    }
  })
}

// 保险
export const zcInsuranceOrderSingleDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInsuranceOrderSingleDetailedList',
      data: data
    }
  })
}

// 贷款
export const zcLoanOrderSingleDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcLoanOrderSingleDetailedList',
      data: data
    }
  })
}

// 查看
export const zcAssetSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetSee',
      data: data
    }
  })
}
// 修改
export const zcAssetEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetEdit',
      data: data
    }
  })
}
